# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=py3-hcloud
pkgver=1.33.0
pkgrel=0
pkgdesc="Official Hetzner Cloud Python library"
url="https://github.com/hetznercloud/hcloud-python"
license="MIT"
arch="noarch"
depends="py3-dateutil py3-requests"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/hetznercloud/hcloud-python/archive/v$pkgver/py3-hcloud-$pkgver.tar.gz"
builddir="$srcdir/hcloud-python-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/hcloud-$pkgver-py3-none-any.whl
}

sha512sums="
77a5799de30fc227be117e1dfaec3835ac5dbe00f47ee9b1a42b5164affc745d3317d612f8bfb58631fe757c59c4352cb96cfef38f94679af6f3fed03c117109  py3-hcloud-1.33.0.tar.gz
"
